package com.zmn.plat.persistence.interfaces.news;

import com.zmn.common.dto.StatusDTO;
import com.zmn.plat.model.entity.news.NewsCategory;
import com.zmn.plat.model.entity.news.NewsCategoryQuery;

import java.util.List;

/**
 * @author nowind
 * @since 17/4/8 16:37
 */
public interface NewsCategoryDao {


    NewsCategory findByKey(Integer categId);

    Integer findKeyForMax();

    List<NewsCategory> listPageByQuery(NewsCategoryQuery query);

    List<NewsCategory> listByQuery(NewsCategoryQuery query);

    Integer countByQuery(NewsCategoryQuery query);


    Integer updateByKey(NewsCategory category);

    Integer updateStatus(NewsCategory category);
    Integer updateStatusBatch(StatusDTO dto);

    Integer updateSort(NewsCategory category);

    Integer updateIconSrc(NewsCategory category);


    Integer insert(NewsCategory category);


    Integer deleteByKey(Integer categId);
}
